var lstate = {
	logined: {
		"logined":true,
		"user":{
			"id":1,
			"email": "admin@m3958.com",
			"mobile":null,
			"name":"admin",
			"displayName":"admin",
			"roles":[
				{"id":2,"name":"ROLE_USER"},
				{"id":1,"name":"ROLE_PERSON_MANAGER"}
			]
		},
		"allRoles":[
			{"id":2,"name":"ROLE_USER"},
			{"id":4,"name":"ROLE_APP_DATA_CHANGE_FIX_RATE"},
			{"id":1,"name":"ROLE_PERSON_MANAGER"},
			{"id":5,"name":"ROLE_NOT_EXIST"}
		]
	},
	notLogined: {
		"logined":false,
		"user":null,
		"allRoles":[]
	}
};

function LoginState() {
  this.state = lstate.notLogined;
}

LoginState.prototype.login = function() {
  this.state = lstate.logined;
  return this.state;
};

LoginState.prototype.logout = function() {
  this.state = lstate.notLogined;
  return this.state;
};

module.exports =  new LoginState();
